JavaScript for Web Developers by Mark Simon

JavaScript for Web Developers by Mark Simon
Author: Mark Simon
Language: eng
Format: epub
ISBN: 9781484297742
Publisher: Apress

The interest rate per payment will be calculated as rate per payment

= annual rate / payments per year / 100

We divide by 100 to convert the percentage.

Number of payments will be calculated as number of payments

= term in years * payments per year

Note that we’ve made another concession to the user. We’re used to expressing interest rates as a percentage, but JavaScript doesn’t know anything about percentages. So we’ll let the user type in what looks like a percentage, and we’ll divide by 100 in the code.1